import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import dayjs from "dayjs";
export const useStore = defineStore('counter', () => {
    const Width = ref(0)
    const isShowMenu = ref(true)
    const NowLoginuser = ref('')
    const isCollapse=ref(false)
  
       
        function editTime(editTime) {
        const datatime = dayjs(editTime);
        return datatime.format("YYYY年MM月DD日 HH:mm:ss");
        }
    
    return { 
        Width,
        isShowMenu,
        NowLoginuser,
        isCollapse,
        editTime
    }
}, {
    persist: true, // 正确的位置
})